package com.freecloud.framework.utils;

import com.freecloud.framework.constant.Constant;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;

/**
 * @Author: maomao
 * @Date: 2019-08-02 17:35
 */
public class SwaggerUtil {

    public static ApiInfo getApiInfo(Constant.CloudApp cloudApp){

        return new ApiInfoBuilder()
                .title(cloudApp.getTitle())
                .description(cloudApp.getDescription())
                .termsOfServiceUrl(cloudApp.getUrl())
                .version(cloudApp.getVersion())
                .build();
    }
}
